home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCMania 73
/
PCMania CD73_1.iso
/
pcmania
/
vbasic73
/
FORMPE~1.FRM
next >
Wrap
Text File
|
1998-09-28
|
3KB
|
96 lines
VERSION 5.00
Object = "{27395F88-0C0C-101B-A3C9-08002B2F49FB}#1.1#0"; "PICCLP32.OCX"
Begin VB.Form Peonzas
Caption = "Peonzas"
ClientHeight = 2070
ClientLeft = 3330
ClientTop = 2610
ClientWidth = 3885
LinkTopic = "Form1"
ScaleHeight = 2070
ScaleWidth = 3885
Begin VB.CommandButton Command2
Caption = "Mapa"
Height = 375
Left = 1920
TabIndex = 2
Top = 1200
Width = 1215
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
Height = 960
Left = 600
ScaleHeight = 60
ScaleMode = 3 'Pφxel
ScaleWidth = 65
TabIndex = 1
Top = 600
Width = 1035
End
Begin VB.Timer Timer1
Interval = 1
Left = 3360
Top = 840
End
Begin VB.CommandButton Command1
Caption = "Girar"
Height = 375
Left = 1920
TabIndex = 0
Top = 600
Width = 1215
End
Begin PicClip.PictureClip PictureClip1
Left = 120
Top = 1800
_ExtentX = 10398
_ExtentY = 4815
_Version = 327680
Rows = 3
Cols = 6
Picture = "formpeonzas.frx":0000
End
End
Attribute VB_Name = "Peonzas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim x As Integer
Dim toggle As Integer
Private Sub Command2_Click()
'Muestra el formulario mapa
Mapa.Show
End Sub
Private Sub Form_Load()
'Muestra una primera imagen de la peonza
Picture1.ScaleMode = vbPixels
Picture1.Picture = PictureClip1.GraphicCell(0)
x = 0
End Sub
Private Sub Command1_Click()
'Indica al control timer si la peonza estß girando o parada
If toggle = 0 Then
Command1.Caption = "Parar"
toggle = 1
Else
Command1.Caption = "Girar"
toggle = 0
End If
End Sub
Private Sub girar()
'Si la subrutina del timer lo ordena, mueve la peonza un "fotograma"
x = x + 1: If x = 18 Then x = 0
Picture1.Picture = PictureClip1.GraphicCell(x)
End Sub
Private Sub Timer1_Timer()
'Importante: acordaros de dar alg·n valor a la propiedad _
interval del timer o no os funcionarß
If toggle = 1 Then girar
End Sub